package org.eenie.kdassistant.utils.xz_encode;

import java.security.MessageDigest;

/**
 * Created by Eenie on 2017/8/11.
 * Email: eeniework@gmail.com
 * Des:
 */

public class MD5Encode {
    public static String a(String paramString)
    {
        return a(paramString, "UTF8");
    }
    public static String a(String paramString1, String paramString2)
    {
        try
        {
            MessageDigest localMessageDigest = MessageDigest.getInstance("MD5");
            localMessageDigest.update(paramString1.getBytes(paramString2));
            paramString1 = new String(a.a(localMessageDigest.digest()));
            return paramString1;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        return "";
    }

}
